<!DOCTYPE html>
<html>
  <head>
    <title>Bootstrap 101 Template</title>
     
    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
    <!-- 
    <link href="css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
     -->
  </head>
  <body>
    <div class="">
     <object id="ZmqSocketFlash" width="0" height="0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
        <param name="movie" value="/zmqsocket/zmqsocket.swf" />
        <param name="allowScriptAccess" value="sameDomain" />
        <embed name="ZmqSocketFlash" width="0" height="0" src="/zmqsocket/zmqsocket.swf" type="application/x-shockwave-flash" />
    </object>
    </div>  
    <div id="message"></div>  
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script src="/zmqsocket/zmqsocket.js"></script>
    <script type="text/javascript">           
          var isReady = false;           
          
          $(function () {
              var socket = new ZmqSocket('A');
              socket.onopen = function() {
                  isReady = true;
                  //alert(isReady)                  
              };

                socket.onmessage = function () {
                    if (socket.available()) {
                        var message = socket.recv();
                        
                         $("#message").html(message);                            
                        
                    } else {
                        alert('Assertion failure!');
                    }
                };
                socket.onclose = function () { alert('close'); };
                socket.onerror = function (msg) { alert(msg); };
                socket.connect("127.0.0.1", 5563);
            });
    </script>
  </body>
</html>